package com.casic.ops.runner.ssh;

import java.util.List;

/**
 * @ClassName ops
 * @Description
 * @Author mianbin
 * @Date 2022/6/22 15:31
 * @Version 1.0
 **/
public interface SshClientContext {
    /**
     * 添加一个sshClient
     *
     * @param taskId    任务id
     * @param sshClient
     */
    void addSshClient(Long taskId, SshClient sshClient);

    /**
     * 查询某个任务的sshClient集合
     *
     * @param taskId 任务id
     * @return
     */
    List<SshClient> getSshClient(Long taskId);

    /**
     * 从上下文中移除某个sshClient
     *
     * @param taskId    任务id
     * @param sshClient
     */
    void remove(Long taskId, SshClient sshClient);
}
